<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8">
    <title>注册页面</title>
    <script>
        function check2psw() {
            if (m1.value!=m2.value){
                alert("两次密码不一致")
                m1.value="";
                m2.value="";
            }
        }
    </script>
</head>
<body>
<a href="#" th:href="@{/e/tui}">登录</a>
<form th:action="@{/u/zhu}" method="post">
    用户名：<input type="text" name="username"/><br/>
    密码：<input type="text" name="psw" id="m1"/><br/>
    确认密码：<input type="text" id="m2" onblur="check2psw()"/><br/>
    角色:<select name="rid">
    <option value="--请选择--"></option>
    <option  th:value="${r.id}" th:each="r:${role}" th:text="${r.name}"></option>
</select><br/>
    <input type="submit" value="注册"/>
</form>
</body>
</html>